package com.edu.zql;

import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * Created by User on 2017/8/25.
 */
public class adasda extends asdas {
    public adasda() {
        System.out.println("asd");
    }
    private static adasda adasda = new adasda();

    public void a() {

    }

    public static void main(String[] args) {


        Pattern p = Pattern.compile("顶级|世界第一");
        Matcher m = p.matcher("顶级阿斯顿撒多撒多撒多时间第实践第世界第一adsadaad");
        StringBuffer sb = new StringBuffer();
        while (m.find()) {
            String group = m.group();
            StringBuilder s = new StringBuilder();
            for (int i = 0; i < group.length(); i++, s.append("*"));

            m.appendReplacement(sb, s.toString());
        }
        m.appendTail(sb);

        System.out.println(sb);

        if (true) return;






        String s = "20509:6145171;1627207:-10,20509:6145171;1627207:-12,20509:6145171;1627207:-2,20509:-17;1627207:-6,20509:28316;1627207:-1,20509:6145171;1627207:-11,20509:-16;1627207:-9,20509:-15;1627207:-9,20509:-15;1627207:-8,20509:-17;1627207:-2,20509:-14;1627207:-8,20509:28317;1627207:-4,20509:-15;1627207:-11,20509:-13;1627207:-5,20509:28316;1627207:-7,20509:28316;1627207:-2,20509:28317;1627207:-2,20509:-15;1627207:-2,20509:28316;1627207:-6,20509:28316;1627207:-10,20509:-17;1627207:-12,20509:6145171;1627207:-8,20509:-13;1627207:-9,20509:-13;1627207:-6,20509:-17;1627207:-5,20509:115781;1627207:-12,20509:-17;1627207:-10,20509:115781;1627207:-10,20509:28316;1627207:-12,20509:28317;1627207:-3,20509:-14;1627207:-4,20509:6145171;1627207:-3,20509:6145171;1627207:-1,20509:28316;1627207:-11,20509:-16;1627207:-8,20509:28316;1627207:-9,20509:-13;1627207:-7,20509:-17;1627207:-9,20509:-16;1627207:-5,20509:28317;1627207:-11,20509:-16;1627207:-11,20509:-13;1627207:-1,20509:-14;1627207:-2,20509:-13;1627207:-4,20509:115781;1627207:-4,20509:-15;1627207:-6,20509:-13;1627207:-8,20509:28316;1627207:-8,20509:-14;1627207:-12,20509:-16;1627207:-3,20509:-17;1627207:-3,20509:28317;1627207:-8,20509:-13;1627207:-2,20509:-17;1627207:-8,20509:-13;1627207:-12,20509:28317;1627207:-7,20509:115781;1627207:-2,20509:-14;1627207:-10,20509:-13;1627207:-10,20509:-16;1627207:-12,20509:-14;1627207:-6,20509:6145171;1627207:-6,20509:28317;1627207:-5,20509:-16;1627207:-4,20509:-13;1627207:-11,20509:-16;1627207:-2,20509:-15;1627207:-10,20509:-15;1627207:-12,20509:6145171;1627207:-7,20509:-16;1627207:-10,20509:-16;1627207:-6,20509:-16;1627207:-7,20509:115781;1627207:-5,20509:-14;1627207:-11,20509:-15;1627207:-3,20509:115781;1627207:-8,20509:-14;1627207:-7,20509:6145171;1627207:-9,20509:115781;1627207:-3,20509:-15;1627207:-5,20509:115781;1627207:-1,20509:-17;1627207:-7,20509:-13;1627207:-3,20509:-14;1627207:-9,20509:-14;1627207:-5,20509:28316;1627207:-3,20509:6145171;1627207:-5,20509:-14;1627207:-3,20509:-17;1627207:-1,20509:115781;1627207:-6,20509:28317;1627207:-6,20509:-17;1627207:-4,20509:-15;1627207:-4,20509:-15;1627207:-7,20509:28317;1627207:-9,20509:115781;1627207:-7,20509:28317;1627207:-10,20509:28317;1627207:-1,20509:-17;1627207:-11,20509:-16;1627207:-1,20509:115781;1627207:-11,20509:28317;1627207:-12,20509:-14;1627207:-1,20509:115781;1627207:-9,20509:6145171;1627207:-4,20509:-15;1627207:-1";

        String[] ss = s.split(",");

        System.out.println(ss.length);
        Map map = new HashMap();
        for (String str : ss) {
            Object o = map.get(str);
            if (o == null) {
                map.put(str, 1);
            } else {
                int i = (int)o + 1;
                map.put(str, i);
            }
        }

        System.out.println();

        System.out.println(new Date(1510061341097L));

    }


}
